layui.define(function(exports){
	var isDev=false;
	var ip=isDev?'http://localhost':"http://"+location.hostname;
	var post=isDev?'8080':location.port;
	var baseurl=ip+":"+post;
	var link={
			//材价信息
			materialPrice:{
				getGuidance:baseurl+'/guidance_service/front/guidance/search.do',
				getGuidanceCatalog:baseurl+'/guidance_service/front/guidance/catalog/search.do',
				searchGuidanceInfo:baseurl+'/guidance_service/front/guidance/info/searchGuidanceInfo.do',
				getMarket:baseurl+'/guidance_service/front/market/search.do',
				getMarketCatalog:baseurl+'/guidance_service/front/market/catalog/search.do',
				getMarketCategory:baseurl+'/guidance_service/front/market/category/searchByCache.do',//获取市场价分类
				searchMarketInfo:baseurl+'/guidance_service/front/market/offer/searchMarketGroup.do',
				searchMarketFilter:baseurl+'/guidance_service/front/market/offer/searchMarketFilter.do',
				searchSolr:baseurl+'/guidance_service/front/market/offer/searchSolr.do'
			},
			//costnorm  政策法规
			costnorm:{
				getField:baseurl+"/guidance_service/front/policies/field/search.do",
				search:baseurl+"/guidance_service/front/policies/searchPolicies.do",
				get:baseurl+"/guidance_service/front/policies/itemGet.do",
				getCatalog:baseurl+"/guidance_service/front/data/catalog/getCatalogs.do"
			},
			//user  登陆注册
			user:{
				login:baseurl+"/guidance_service/front/user/login.do",
				register:baseurl+"/guidance_service/front/user/register.do",
				getRegCode:baseurl+"/guidance_service/front/user/getRegCode.do",
				getFogCode:baseurl+"/guidance_service/front/user/getFogCode.do",
				fogPwd:baseurl+"/guidance_service/front/user/fogPwd.do"
			},
			//软件推荐
			software:{
				get:baseurl+"/guidance_service/front/soft/get.do",
				search:baseurl+"/guidance_service/front/soft/search.do",
				getCategory:baseurl+"/guidance_service/front/soft/category/getCategory.do"
			}
		};
	var data={};
	var Router ={
			baseurl:baseurl,
			init:function(options){
				ip=options.ip || location.hostname;
				post=options.post ||location.port;
				api=options.api　|| '';
				console.log("this baseurl is :"+baseurl);
			},
			link:link,
			data:data
	};
	exports('Router',Router); //注意，这里是模块输出的核心，模块名必须和use时的模块名一致
});   
